/* 基础样式 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Logo 样式 */
.navbar-brand img {
    height: 40px;
    width: auto;
    margin-right: 10px;
    border-radius: 4px;
}

/* 背景图片样式 */
.bg-railway {
    background-image: url('/images/background.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
}

.bg-railway::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.bg-railway::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 123, 255, 0.1), rgba(108, 16, 242, 0.1));
    z-index: 1;
}

.bg-railway > * {
    position: relative;
    z-index: 2;
}

/* 登录/注册页面背景 */
.auth-page {
    min-height: 100vh;
    background-image: url('/images/background.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 255, 0.1);
    z-index: 1;
}

.auth-card {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #ffc107 !important;
}

/* 卡片样式 */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    font-weight: 600;
    border: none;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border: none;
    color: #212529;
}

/* 表格样式 */
.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* 表单样式 */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 页脚样式 */
footer {
    margin-top: auto;
    background: #f8f9fa !important;
}

/* 首页特殊样式 */
.jumbotron {
    background: linear-gradient(135deg, #007bff, #6610f2);
    color: white;
}

/* 加载动画 */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* 徽章样式 */
.badge {
    font-size: 0.8em;
}

/* 警告样式 */
.alert {
    border: none;
    border-radius: 8px;
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    /* 响应式 Logo 样式 */
    .navbar-brand img {
        height: 35px;
    }
    
    .admin-logo {
        height: 30px;
    }
    
    .sidebar-logo {
        height: 25px;
    }
}

/* 状态指示器 */
.status-confirmed {
    color: #28a745;
}

.status-pending {
    color: #ffc107;
}

.status-cancelled {
    color: #dc3545;
}

/* 特殊元素 */
.text-gradient {
    background: linear-gradient(135deg, #007bff, #6610f2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 搜索结果样式 */
.search-results {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 侧边栏边框颜色 */
.border-left-primary {
    border-left: 4px solid #007bff !important;
}

.border-left-success {
    border-left: 4px solid #28a745 !important;
}

.border-left-info {
    border-left: 4px solid #17a2b8 !important;
}

.border-left-warning {
    border-left: 4px solid #ffc107 !important;
}

/* 图片加载优化 */
.navbar-brand img,
.admin-logo,
.sidebar-logo {
    transition: opacity 0.3s ease;
    object-fit: contain;
}

/* 为特定页面添加背景效果 */
.page-with-bg {
    background-image: url('/images/background.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.page-with-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: -1;
}

/* Logo hover 效果 */
.navbar-brand:hover img {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* 侧边栏 Logo 居中对齐 */
.sidebar-logo {
    display: block;
    margin: 0 auto 15px auto;
}

/* 搜索表单卡片样式增强 */
.search-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
